import React, {Component, useEffect, useState} from 'react'
import {Button} from 'antd'

export const AquraTest = () => {
  const [count, setCount] = useState(1);
  console.log(`render ~~~~~~~~ ${count}`);

  useEffect(() => {
    console.log(`do effect  ~~~~~~~~ ${count}`);
    return () => {
      console.log(`effect destroy ~~~~~~~~ ${count}`);
    }
  }, [count])

  return <div>
    <span>ReactTest 🎈🎈👔👕🖼🎐🧧🎆🎀🎪👓🎢🦺🪁🎯🏑🥈🧩</span>

    <Button type="primary" onClick={() => {
      setCount((prev) => prev + 1)
    }}>Count INCREASE</Button>
  </div>
}

